import Vue from 'vue';
import Vuex from 'vuex';
Vue.use(Vuex);
import {GLOBAL_TYPES} from './types';

export default new Vuex.Store({
    modules: {
        global: {
            state: {
                userInfo: {
                    name: ''
                }
            },
            mutations: {
                [GLOBAL_TYPES.SAVE_USER_ACTION] (state, info) {
                    state.userInfo = info;
                },

            },
            actions: {
            }
        }

    },
    state: {
    },
    mutations: {},
    strict: {},
    plugins: [],
});